home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / WIN / VB_CTRLS / BLOONVB.ZIP / GENERAPP.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-09-18  |  9.5 KB  |  279 lines

  1. VERSION 2.00
  2. Begin Form Balloon_Form 
  3.    Caption         =   "Help Ballon Test"
  4.    ClientHeight    =   5325
  5.    ClientLeft      =   1305
  6.    ClientTop       =   2070
  7.    ClientWidth     =   5085
  8.    Height          =   6015
  9.    Left            =   1245
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   5325
  12.    ScaleWidth      =   5085
  13.    Top             =   1440
  14.    Width           =   5205
  15.    Begin Balloon Balloon1 
  16.       BackColor       =   &H0000FFFF&
  17.       ForeColor       =   &H000000FF&
  18.       Left            =   2400
  19.       Top             =   3480
  20.    End
  21.    Begin ComboBox Combo1 
  22.       Height          =   300
  23.       Left            =   240
  24.       TabIndex        =   15
  25.       Text            =   "Combo1"
  26.       Top             =   2880
  27.       Width           =   2175
  28.    End
  29.    Begin CommandButton BTN_Dialog 
  30.       Caption         =   "Dialog"
  31.       Height          =   375
  32.       Left            =   240
  33.       TabIndex        =   14
  34.       Top             =   240
  35.       Width           =   1335
  36.    End
  37.    Begin OptionButton Option3 
  38.       Caption         =   "Maybe option"
  39.       Height          =   255
  40.       Left            =   1200
  41.       TabIndex        =   13
  42.       Top             =   4320
  43.       Width           =   1575
  44.    End
  45.    Begin PictureBox Picture1 
  46.       AutoSize        =   -1  'True
  47.       ClipControls    =   0   'False
  48.       Height          =   360
  49.       Left            =   360
  50.       Picture         =   GENERAPP.FRX:0000
  51.       ScaleHeight     =   330
  52.       ScaleWidth      =   360
  53.       TabIndex        =   12
  54.       Top             =   3600
  55.       Width           =   390
  56.    End
  57.    Begin CheckBox Check2 
  58.       Caption         =   "That"
  59.       Height          =   255
  60.       Left            =   1200
  61.       TabIndex        =   11
  62.       Top             =   3840
  63.       Width           =   1200
  64.    End
  65.    Begin CheckBox Check1 
  66.       Caption         =   "This"
  67.       Height          =   255
  68.       Left            =   1200
  69.       TabIndex        =   10
  70.       Top             =   3360
  71.       Width           =   1200
  72.    End
  73.    Begin Frame Frame1 
  74.       Caption         =   "Do it now"
  75.       Height          =   1215
  76.       Left            =   3000
  77.       TabIndex        =   7
  78.       Top             =   3120
  79.       Width           =   1695
  80.       Begin OptionButton Option2 
  81.          Caption         =   "No"
  82.          Height          =   255
  83.          Left            =   240
  84.          TabIndex        =   9
  85.          Top             =   720
  86.          Width           =   1000
  87.       End
  88.       Begin OptionButton Option1 
  89.          Caption         =   "Yes"
  90.          Height          =   255
  91.          Left            =   240
  92.          TabIndex        =   8
  93.          Top             =   360
  94.          Width           =   1000
  95.       End
  96.    End
  97.    Begin TextBox TXT_Result 
  98.       Height          =   375
  99.       Left            =   120
  100.       TabIndex        =   6
  101.       Text            =   "Status output"
  102.       Top             =   4800
  103.       Width           =   4815
  104.    End
  105.    Begin TextBox TXT_KeyString 
  106.       Height          =   375
  107.       Left            =   120
  108.       TabIndex        =   3
  109.       Text            =   "This is a popup message to display in the window. The message can be of long length, or it can be short."
  110.       Top             =   1440
  111.       Width           =   4815
  112.    End
  113.    Begin CommandButton BTN_Exit 
  114.       Caption         =   "Exit"
  115.       Height          =   375
  116.       Left            =   3480
  117.       TabIndex        =   2
  118.       Top             =   240
  119.       Width           =   1455
  120.    End
  121.    Begin TextBox TXT_SearchString 
  122.       Height          =   375
  123.       Left            =   120
  124.       TabIndex        =   1
  125.       Text            =   "Dawg"
  126.       Top             =   2280
  127.       Width           =   4815
  128.    End
  129.    Begin CommandButton Btn_HelpSession 
  130.       Caption         =   "Help Balloons"
  131.       Height          =   375
  132.       Left            =   1800
  133.       TabIndex        =   0
  134.       Top             =   240
  135.       Width           =   1455
  136.    End
  137.    Begin Label Label3 
  138.       Alignment       =   2  'Center
  139.       Caption         =   "Search String"
  140.       Height          =   255
  141.       Left            =   120
  142.       TabIndex        =   5
  143.       Top             =   1920
  144.       Width           =   4815
  145.    End
  146.    Begin Label Label1 
  147.       Alignment       =   2  'Center
  148.       Caption         =   "Key String"
  149.       Height          =   255
  150.       Left            =   120
  151.       TabIndex        =   4
  152.       Top             =   1080
  153.       Width           =   4815
  154.    End
  155.    Begin Menu nmu_File 
  156.       Caption         =   "&File"
  157.       Begin Menu mnu_Exit 
  158.          Caption         =   "&Exit"
  159.       End
  160.    End
  161.    Begin Menu mnu_Edit 
  162.       Caption         =   "&Edit"
  163.       Begin Menu mnu_Cut 
  164.          Caption         =   "Cu&t"
  165.       End
  166.       Begin Menu mnu_Copy 
  167.          Caption         =   "&Copy"
  168.       End
  169.       Begin Menu mnu_Paste 
  170.          Caption         =   "&Paste"
  171.       End
  172.       Begin Menu mnu_submenu 
  173.          Caption         =   "SubMenu"
  174.          Begin Menu mnu_submenu1 
  175.             Caption         =   "SubMenu 1"
  176.          End
  177.          Begin Menu mnu_submenu2 
  178.             Caption         =   "SubMenu 2"
  179.          End
  180.       End
  181.    End
  182.    Begin Menu mnu_help 
  183.       Caption         =   "&Help"
  184.       Begin Menu mnu_HelpBalloons 
  185.          Caption         =   "Help &Balloons"
  186.       End
  187.    End
  188. Option Explicit
  189. Sub Balloon1_BalloonClick (hwndAtMouse As Integer)
  190. ' PURPOSE:  hwndAtMouse is the control the mouse is over
  191. ' COMMENTS: pass back the help text
  192. '           shows how to programmatcially end a session
  193. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  194. Dim Msg As String
  195. Dim CRLF As String
  196.     CRLF = Chr$(13) + Chr$(10)
  197.     Select Case hwndAtMouse
  198.         Case Me.hWnd
  199.             Exit Sub    ' do nothing
  200.         Case BTN_Dialog.hWnd
  201.             ' set font and back colors dynamically
  202.             Balloon1.ForeColor = QBColor(0)
  203.             Balloon1.BackColor = QBColor(2)
  204.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_Dialog."
  205.         Case Btn_HelpSession.hWnd
  206.             ' set font and back colors dynamically
  207.             Balloon1.ForeColor = &HFF0000    ' blue
  208.             Balloon1.BackColor = &HC0C0C0    ' light grey
  209.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Btn_HelpSession."
  210.         Case BTN_Exit.hWnd
  211.             ' set font and back colors dynamically
  212.             Balloon1.ForeColor = QBColor(4)
  213.             Balloon1.BackColor = QBColor(14)
  214.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_Exit."
  215.         Case TXT_KeyString.hWnd
  216.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_KeyString."
  217.         Case TXT_SearchString.hWnd
  218.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_SearchString."
  219.         Case TXT_Result.hWnd
  220.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_Result."
  221.         Case Picture1.hWnd
  222.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Picture1."
  223.         Case Check1.hWnd
  224.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check1."
  225.         Case Check2.hWnd
  226.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check2."
  227.         Case Frame1.hWnd
  228.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Frame1."
  229.         Case Option1.hWnd
  230.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option1."
  231.         Case Option2.hWnd
  232.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option2."
  233.         Case Option3.hWnd
  234.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option3."
  235.         Case Combo1.hWnd
  236.             Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Combo1."
  237.         Case Else
  238.         
  239.         End Select
  240.         
  241. End Sub
  242. Sub BTN_Dialog_Click ()
  243.     Dialog.Show
  244. End Sub
  245. Sub BTN_Exit_Click ()
  246.     mnu_Exit_Click
  247. End Sub
  248. Sub Btn_HelpSession_Click ()
  249.     ' initial help text string
  250.     ' here we get the text from the on screen text box
  251.     '
  252.     ' Initial text can be left blank, if blank then
  253.     ' Balloon.vbx control will display an internal init message
  254.     Balloon1.MessageText = TXT_KeyString.Text
  255.     Balloon1.Action = 20     ' Balloon_START = 20
  256. End Sub
  257. Sub Form_Load ()
  258.     Me.Top = 0
  259.     Me.Left = 0
  260. End Sub
  261. Sub Form_Resize ()
  262.     If Me.WindowState = 0 Then
  263.         Me.Height = 6015
  264.         Me.Width = 5175
  265.     End If
  266. End Sub
  267. Sub mnu_Exit_Click ()
  268.     End
  269. End Sub
  270. Sub mnu_HelpBalloons_Click ()
  271.     ' initial help text string
  272.     ' here we get the text from the on screen text box
  273.     '
  274.     ' Initial text can be left blank, if blank then
  275.     ' Balloon.vbx control will display an internal init message
  276.     Balloon1.MessageText = TXT_KeyString.Text
  277.     Balloon1.Action = 20     ' Balloon_START = 20
  278. End Sub
  279.